<template>
  <el-row :gutter="20">
    <el-col :span="6" v-for="item in arr" :key="item.id">
      <div class="col-item">
        <!-- 1.图标 -->
        <i
          class="iconfont"
          :class="item.icon"
          :style="{ color: item.color }"
        ></i>
        <!-- 2.数据和标题 -->
        <div>
          <h3>{{ item.title }}</h3>
          <p>{{ item.count }}</p>
        </div>
      </div>
    </el-col>
  </el-row>
</template>

<script>
export default {
  props: {
    arr: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="less" scoped>
.col-item {
  display: flex;
  background-color: #fff;
  justify-content: space-around;
  align-items: center;
  border-radius: 6px;
  i {
    font-size: 30px;
  }
  div {
    text-align: center;
    margin: 10px 5px;
  }
  h3 {
    margin: 0;
    font-weight: 100;
  }
  p {
    margin: 0;
    font-weight: 700;
  }
}
</style>
